package com.lyj.mode.proxy.dynamic.cglib;

/**
 * 测试类
 * @author:liyajie
 * @createTime:2022/2/23 15:44
 * @version:1.0
 */
public class Test {
    public static void main(String[] args) {
        // 创建目标对象
        TargetPhone targetPhone = new TargetPhone();
        // 获取代理对象
        TargetPhone proxyInstance = (TargetPhone)new ProxyFactory(targetPhone).getProxyInstance();
        // 通过代理对象调用具体的方法
        proxyInstance.sellPhone();
    }
}
